package com.mlyol.singleton;

public class Demo1 {

    public static void main(String[] args) {
        Demo1 instance1 = Demo1.getInstance();
        Demo1 instance2 = Demo1.getInstance();
        System.out.println(instance1==instance2);
    }

    private Demo1() {

    }

    private static Demo1 instance = new Demo1();

    public static Demo1 getInstance() {
        return instance;
    }


}
